package com.pengtu.entity.history;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.pengtu.entity.IdEntity;
import com.pengtu.entity.project.ProjectInfo;

/**
 * 项目历史表
 * @author liuyang
 *
 */
@Entity
@Table(name = "T_Q_HISTORY_PROJECT")
public class HistoryProject extends IdEntity {

	/**
	 *
	 */
	private static final long serialVersionUID = 1L;

	private String userName;//用户名
	private Date startDate;//开始时间
	private Date endDate;//结束时间
	private ProjectInfo projectInfo;//工程
	private String taskId;//任务ID
	private String message;//评论
	private String status;//状态 
	private String key;//业务ID
	private String endFlag = "0";//流程启动状态

	private String activityName;//节点名称
	
	private String remark;//备注

	@Column(name="USERNAME")
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}

	@Column(name="STARTDATE")
	public Date getStartDate() {
		return startDate;
	}
	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	@Column(name="ENDDATE")
	public Date getEndDate() {
		return endDate;
	}
	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	@ManyToOne(targetEntity=ProjectInfo.class,fetch=FetchType.LAZY)
	@JoinColumn(name="PROJECTID")
	public ProjectInfo getProjectInfo() {
		return projectInfo;
	}
	public void setProjectInfo(ProjectInfo projectInfo) {
		this.projectInfo = projectInfo;
	}

	@Column(name="TASKID")
	public String getTaskId() {
		return taskId;
	}
	public void setTaskId(String taskId) {
		this.taskId = taskId;
	}

	@Column(name="MESSAGE")
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}

	@Column(name="STATUS")
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}

	@Column(name="KEY")
	public String getKey() {
		return key;
	}
	public void setKey(String key) {
		this.key = key;
	}

	@Column(nullable = false,columnDefinition = "varchar2(1) default '0'",name="ENDFLAG")
	public String getEndFlag() {
		return endFlag;
	}
	public void setEndFlag(String endFlag) {
		this.endFlag = endFlag;
	}

	@Column(name="ACTIVITYNAME")
	public String getActivityName() {
		return activityName;
	}
	public void setActivityName(String activityName) {
		this.activityName = activityName;
	}
	
	/**
	 * remark
	 *
	 * @return  the remark
	 * @since   1.0.0
	 */
	@Column(name="REMARK")
	public String getRemark() {
		return remark;
	}
	/**
	 * @param remark the remark to set
	 */
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
}
